package com.nbsaas.boot.store.rest.convert;

import com.nbsaas.boot.store.data.entity.StoreImage;
import com.nbsaas.boot.store.api.domain.simple.StoreImageSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 列表对象转换器
*/

public class StoreImageSimpleConvert implements Converter<StoreImageSimple, StoreImage> {




@Override
public StoreImageSimple convert(StoreImage source) {
    StoreImageSimple result = new StoreImageSimple();

                if(source.getStore()!=null){
                    result.setStoreName(source.getStore().getName());
                }
                if(source.getStore()!=null){
                    result.setStore(source.getStore().getId());
                }
                result.setId(source.getId());
                result.setAddDate(source.getAddDate());
                result.setUrl(source.getUrl());
                result.setLastDate(source.getLastDate());


    return result;
}

}